package lu.med.praxiswahl.wahlumed.client.kalender;

import javax.swing.JTable;
import javax.swing.table.TableColumn;

import lu.med.praxiswahl.wahlumed.client.utilities.ColumnWidthControler;
import lu.med.praxiswahl.wahlumed.client.wclient.Main;


public class InternetTable extends JTable
{
    /**
     * 
     */
    private static final long serialVersionUID = -1983690976949978107L;

    public InternetTable(InternetTableModel model)
    {
	super(model);
	ColumnWidthControler c = new ColumnWidthControler(
		Main.COLUMNWIDTH_CONFIGURATION_FILE, "internettbl", this);

	TableColumn column = null;
	for (int i = 0; i < 8; i++)
	{
	    column = this.getColumnModel().getColumn(i);
	    switch (i)
	    {
	    case 0:
		column.setPreferredWidth(c.getColumnWidth(0));
		break;
	    case 1:
		column.setPreferredWidth(c.getColumnWidth(1));
		break;
	    case 2:
		column.setPreferredWidth(c.getColumnWidth(2));
		break;
	    case 3:
		column.setPreferredWidth(c.getColumnWidth(3));
		break;
	    case 4:
		column.setPreferredWidth(c.getColumnWidth(4));
		break;
	    case 5:
		column.setPreferredWidth(c.getColumnWidth(5));
		break;
	    }
	}
    }
}